﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

/// <summary>
///SuanhuaRecord 的摘要说明
/// </summary>
public class SuanhuaRecord : SingleRecord
{
    private decimal d_SHBJ;

    public SuanhuaRecord(string jh, string jb, string cslb, string kgrq, string wgrq, string csmc, string sgfs, string cscd, string bz,decimal shbj):base(jh,jb,cslb,kgrq,wgrq,csmc,sgfs,cscd,bz)
    {
        SHBJ = shbj;

        SelectStr = "select count(*) from bc_cscgjl where jh='" + JH + "' and cslb='1200' and jb='" + JB + "' and kgrq=to_date('" + KGRQ + "','yyyy-mm-dd')";        
        InsertStr = "insert into bc_cscgjl(jh,jb,cslb,kgrq,wgrq,csmc,sgfs,cscd,shbj,bz) values('" + JH + "','" + JB + "','1200',to_date('" + KGRQ + "','yyyy-mm-dd'),to_date('" + WGRQ + "','yyyy-mm-dd'),'" + CSMC + "','" + SGFS + "','" + CSCD + "'," + SHBJ + ",'" + BZ + "')";
    }
    public SuanhuaRecord(DataRow dr):base(dr)
    {
        //SHBJ = decimal.Parse(dr["酸化半径"].ToString());
        decimal shbj_temp;
        decimal.TryParse(dr["酸化半径"].ToString(), out shbj_temp);
        SHBJ = shbj_temp;

        SelectStr = "select count(*) from bc_cscgjl where jh='" + JH + "' and cslb='1200' and jb='" + JB + "' and kgrq=to_date('" + KGRQ + "','yyyy-mm-dd')";
        InsertStr = "insert into bc_cscgjl(jh,jb,cslb,kgrq,wgrq,csmc,sgfs,cscd,shbj,bz) values('" + JH + "','" + JB + "','1200',to_date('" + KGRQ + "','yyyy-mm-dd'),to_date('" + WGRQ + "','yyyy-mm-dd'),'" + CSMC + "','" + SGFS + "','" + CSCD + "'," + SHBJ + ",'" + BZ + "')";
    }
    
    public decimal SHBJ
    {
        get { return d_SHBJ; }
        set { if (d_SHBJ != value) { d_SHBJ = value; } }
    }
}